<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<table width="100%">
	<tbody>
		<tr>
			<td height="30" class="sectionheading bottom-border">
				Announcements Manager
			</td>
		</tr>
		<tr>
        	<td height="8">
        		<s:actionmessage cssClass="note-red"/>
        		<s:actionerror cssClass="note-red"/>
        		<s:fielderror cssClass="note-red"/>
        	</td>
        </tr>
        <tr>
        	<td align="right" height="30">
				<s:a theme="simple" href="showAnnouncement.htm" cssClass="navi-link"> New Announcement </s:a>
			</td>
		</tr>
		<tr>
			<td>
				<display:table name="announcementList" style="width: 100%;" pagesize="5" cellpadding="0" cellspacing="0" requestURI="showAnnouncementsManager.htm" id="row" class="verdana12blacknormal">
					<display:column title="#" headerClass="Table-Head right-border" class="right-border">
						<c:out value="${row_rowNum}" />
					</display:column>

					<display:column headerClass="Table-Head right-border" class="right-border" titleKey="label.system.Date" title="Date">
						<s:date name="#attr.row.date" format="dd/MM/yyyy hh:mm" />
					</display:column>
					<display:column headerClass="Table-Head right-border" class="right-border" titleKey="label.system.Subject" property="subject" />
					<display:column headerClass="Table-Head right-border" class="right-border" titleKey="label.system.Name" property="name"/>
					<display:column headerClass="Table-Head right-border" property="email" autolink="true" titleKey="label.system.Email" class="navi-link right-border" />
					<display:column headerClass="Table-Head right-border" autolink="true" title="Active" class="navi-link right-border" >
						<s:if test="%{#attr.row.active == true}">
							<img src="../images/yes.gif"
												alt="YES" border="0">
						</s:if>
						<s:else>
							<img src="../images/no.gif"
												alt="NO" border="0">
						</s:else>
					</display:column>
					<display:column headerClass="Table-Head" style="align: center;"
						titleKey="label.system.Actions">
						<s:a theme="simple" href="showAnnouncement.htm?id=%{#attr.row.id}" cssClass="verdana11greynormal"><img src="../Admin-Images/edit-icon.gif" style="border: 0" alt="Edit"></s:a>
						<s:a theme="simple" href="deleteAnnouncement.htm?id=%{#attr.row.id}" cssClass="verdana11greynormal" onclick="return wantToDelete('Are You sure you want to delete this announcement?');"><img src="../Admin-Images/delete-icon.gif" align="top" style="border: 0" alt="Delete"></s:a>
						<s:a theme="simple" href="copyAnnouncementsManager.htm?id=%{#attr.row.id}" cssClass="verdana11greynormal"><img src="../Admin-Images/copy.jpg" style="border: 0" alt="Edit"></s:a>
					</display:column>
				</display:table>
			</td>
		</tr>
	</tbody>
</table>